package com.sex.bull.melancholy.service.mybatis.service;

import com.sex.bull.melancholy.service.mybatis.bean.Oauth2App;
import com.sex.bull.melancholy.service.mybatis.dao.Oauth2AppDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by LiM on 2017/8/25.
 */
@Service
public class Oauth2AppService {
    @Autowired
    Oauth2AppDao oauth2AppDao;

    /**
     *查询所有
     * @param oauth2App
     * @return
     * @throws Exception
     */
    public List<Oauth2App> queryAllList(Oauth2App oauth2App) throws Exception{
        return oauth2AppDao.queryAllList(oauth2App);
    }

    /**
     * 新增数据
     * @param oauth2App
     * @throws Exception
     */
    public void addData(Oauth2App oauth2App) throws Exception{
        oauth2AppDao.addData(oauth2App);
    }

    /**
     * 新增数据
     * @param oauth2AppList
     * @throws Exception
     */
    public void addData(List<Oauth2App> oauth2AppList) throws Exception {
        oauth2AppDao.addData(oauth2AppList);
    }

    /**
     * 更新数据
     * @param oauth2App
     * @throws Exception
     */
    public void updateData(Oauth2App oauth2App) throws Exception{
        oauth2AppDao.updateData(oauth2App);
    }

    /**
     * 逻辑删除数据
     * @param oauth2App
     * @throws Exception
     */
    public void deleteData(Oauth2App oauth2App) throws Exception{
        oauth2AppDao.deleteData(oauth2App);
    }
}
